using System;
using System.Collections.Generic;
using System.Text;
using BusinessObjects.BO_Actions;
using Entity.StoreProcedure;
using BusinessObjects;
using System.Data;
namespace BusinessObjects.BO_GetObjects
{
    public static class BO_portal_articles_related
    {
        public static string Insert(int article_id, int article_related)
        {
            try
            {
                usp_portal_articles_related_insert entity = new usp_portal_articles_related_insert();
                entity.ARTICLE_ID = article_id;
                entity.ARTICLE_RELATED = article_related;

                return BO_Actions<usp_portal_articles_related_insert>.ExecuteAndReturnStringValue(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static DataTable Select(int article_id)
        {
            try
            {
                usp_portal_articles_related_select entity = new usp_portal_articles_related_select();
                entity.ARTICLE_ID = article_id;
                return BO_Actions<usp_portal_articles_related_select>.ExecuteAndReturnDataTable(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static string Update(int article_id, int article_related)
        {
            try
            {
                usp_portal_articles_related_update entity = new usp_portal_articles_related_update();
                entity.ARTICLE_ID = article_id;
                entity.ARTICLE_RELATED = article_related;
                return BO_Actions<usp_portal_articles_related_update>.ExecuteAndReturnStringValue(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static string Delete(int article_id, string indel)
        {
            try
            {
                usp_portal_articles_related_delete entity = new usp_portal_articles_related_delete();
                entity.ARTICLE_ID = article_id;
                entity.INDEL = indel;
                return BO_Actions<usp_portal_articles_related_delete>.ExecuteAndReturnStringValue(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}

